package com.example.springsecurity.mapper;

import com.example.springsecurity.domain.Announcement;
import com.example.springsecurity.domain.News;
import com.example.springsecurity.domain.RoProject;
import com.example.springsecurity.domain.UploadCentre;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ExperimentPortalMapper {


    List<RoProject> getPortalExperiment(@Param("collegeId") Integer collegeId,@Param("projectName") String projectName);

    List<News> getNews(@Param("year") Integer year,@Param("month") Integer month,@Param("newsTitle") String newsTitle);

    Integer addNews(News news);

    Integer updateNews(News news);

    List<Announcement> getAnnouncement(@Param("year") Integer year,@Param("month") Integer month,@Param("announcementTitle") String announcementTitle);

    Integer addAnnouncement(Announcement announcement);

    Integer updateAnnouncement(Announcement announcement);

    List<UploadCentre> getUploadInfo(@Param("uploadCategory") Integer uploadCategory,@Param("uploadIntroduce") String uploadIntroduce);

    Integer updateUploadInfo(UploadCentre uploadCentre);

    Integer addUploadInfo(UploadCentre uploadCentre);

    String downloadInfo(@Param("uploadCentreId") Integer uploadCentreId);

    News getNewsDetail(@Param("newsId") Integer newsId);

    Integer deleteNews( int[] newsId);

    Announcement getAnnouncementId(@Param("announcementId") Integer announcementId);

    Integer deleteAnnouncement(int[] announcementId);

    Integer deleteDownTool( int[] uploadCentreId);
}
